package com.travel.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.sql.Date;

/**
 * 用户评论实体类
 * 存储用户对文章的评论信息
 * Author:Jasenon_ce
 * Date: 2025.04.19/下午3:07
 */
@Data
@TableName("forum_comment")
@ApiModel(value = "用户评论", description = "用户对文章的评论信息")
public class UserComment {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("评论ID")
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    private Integer id;

    @ApiModelProperty(value = "文章ID", notes = "被评论的文章ID", required = true)
    private Integer articleId;

    @ApiModelProperty(value = "用户ID", notes = "评论发布者的用户ID", required = true)
    private Long userId;

    @ApiModelProperty(value = "评论内容", notes = "评论的文本内容", required = true)
    private String content;

    @ApiModelProperty(value = "创建时间", notes = "评论的创建时间，系统自动生成")
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    private Date createTime = new Date(System.currentTimeMillis());
}
